<?php
abstract class database{
private $conn;

abstract public function select($sql);
abstract public function getOne($sql);
abstract public function insert($tableName,$arValues);
abstract public function update($tableName,$arInsert,$sWhere=null);
abstract public function delete($tableName,$sWhere=null);
abstract public function nextId($tableName,$sColumn);

public function quoteSmart($in){
	if(is_string($in)){return $this->quoteString($in);}
	elseif (is_int($in)){return $this->quoteInt($in);}
	elseif (is_float($in)){return $this->quoteFloat($in);}
	elseif (is_bool($in)){return $this->quoteBoolean($in);}
	elseif (is_null($in)){return 'null';}
}
public function quoteString($string){
	return "'$string'";
}
public function quoteInt($int){
	return $int;
}
public function quoteFloat($float){
	return str_replace(',','.',$float);
}
public function quoteBoolean($boolean){
	return $boolean?"'true'":"'false'";
}
}
?>